home *** CD-ROM | disk | FTP | other *** search
/ Network Support Library / RoseWare - Network Support Library.iso / dirmgmt / xcpyfx.txt < prev    next >
Text File  |  1988-12-23  |  5KB  |  116 lines

  1.  
  2. #: 14869 S3/Shell &/or WorkStn
  3.     24-Dec-88  19:26:09
  4. Sb: #DOS 3.3x XCOPY bug
  5. Fm: Art Rothstein 70020,516
  6. To: All
  7.  
  8. There is a bug in XCOPY.EXE in version 3.3x of DOS.  The problem occurs only in
  9. certain cases and only when the target drive is a Novell network disk. 
  10. (Microsoft must be gloating.)
  11.  
  12. To demonstrate the problem, create directories C:\TEST, C:\TEST\1, Z:\TEST and
  13. Z:\TEST\1.  In C:\TEST\1, use your favorite text editor to create 9 files,
  14. named 1, 2, ..., 9, each containing just the character '1'.  Each file is then
  15. 4 bytes long, the hex values being 31 0D 0A 1A. Make TEST the current directory
  16. on C: and Z:.  Make Z: the current drive.  Run XCOPY C: /S.  Watch your system
  17. freeze up, requiring you to bounce the power switch.
  18.  
  19. We have seen the problem in all the DOS 3.3x versions we have inspected, IBM
  20. 3.30, Compaq 3.31, AST 3.30, Dell 3.30, Everex 3.30, Wyse 3.30. (The latter
  21. four versions are identical, and the Compaq differs only in the version number
  22. and, consequently, in the EXE file header checksum.)
  23.  
  24. We ran this test case on an IBM AT model 339 with PC DOS 3.30.  Network
  25. software versions were: (continued...)
  26.  
  27.  
  28.  
  29. *** There is a reply:   14870
  30.  
  31. Press <CR> for next or type CHOICES !
  32. #: 14870 S3/Shell &/or WorkStn
  33.     24-Dec-88  19:26:26
  34. Sb: #14869-#DOS 3.3x XCOPY bug
  35. Fm: Art Rothstein 70020,516
  36. To: Art Rothstein 70020,516
  37.  
  38. (...continued) NET3.COM:  V2.12 rev. C as reported by NET3 I; V2.12 Rev. D as
  39. reported by NVER.
  40.  
  41. IPX.COM:  V2.12 Rev. B as reported by IPX I.
  42.  
  43. Server:  AN286 V2.12 Rev. A 8/12/88 as reported by NVER; 2.12 Revision 0 as
  44. reported by SYSCON.
  45.  
  46. The bug is a simple one, and it's easily patched inline.  The program
  47. inadvertently changes the DOS disk transfer area (DTA) to an invalid location,
  48. does a DOS 4EH call that fails, then changes the DTA to a valid location.  In
  49. our test case, the invalid DTA is 0:80H, right in the heart of the CPU
  50. interrupt vector area.  When the target of the XCOPY is a local disk, DOS's 4EH
  51. code gets control, and it apparently does not use this invalid DTA.  When the
  52. target is a network disk, the Netware shell gets control, and it writes to the
  53. invalid DTA, eventually causing the freeze. (continued...)
  54.  
  55.  
  56.  
  57. *** There is a reply:   14871
  58.  
  59. Press <CR> for next or type CHOICES !
  60. #: 14871 S3/Shell &/or WorkStn
  61.     24-Dec-88  19:27:00
  62. Sb: #14870-DOS 3.3x XCOPY bug
  63. Fm: Art Rothstein 70020,516
  64. To: Art Rothstein 70020,516
  65.  
  66. (...continued) The patch is the same for all versions of XCOPY we checked:
  67.  
  68.  C:\DOS330>ren xcopy.exe a
  69.  
  70.  C:\DOS330>debug a
  71.  -d 1c50 l 3
  72.  280E:1C50  CD 21 8E                                          .!.
  73.  -a 1c50
  74.  280E:1C50 nop
  75.  280E:1C51 es:
  76.  280E:1C52
  77.  -w
  78.  Writing 2BD0 bytes
  79.  -q
  80.  
  81.  C:\DOS330>ren a xcopy.exe
  82.  
  83.  
  84.  
  85. Press <CR> for next or type CHOICES !
  86. ADDITION:::::
  87. #: 15310 S3/Shell &/or WorkStn                                               
  88.     31-Dec-88  01:06:00                                                      
  89. Sb: #15288-DOS 3.3 bug redux                                                 
  90. Fm: Art Rothstein 70020,516                                                  
  91. To: Art Rothstein 70020,516                                                  
  92.                                                                              
  93. Correction:  "Fix one bug and create another."  The problem was in my patch. 
  94. goofed in thinking the DOS 2FH call stuffed DS:DX and was unnecessary. It    
  95. actually stuffs ES:BX, both of which are used later on in the code.  A better
  96. patch is                                                                     
  97.                                                                              
  98. C:\WORK1>ren xcopy.exe a                                                     
  99.                                                                              
  100. C:\WORK1>debug a -u 1c52 l 7                                                 
  101. 2674:1C52 8E1EAE01      MOV     DS,[01AE]                                    
  102. 2674:1C56 BA8000        MOV     DX,0080                                      
  103. -a 1c52                                                                      
  104. 2674:1C52 es:                                                                
  105. 2674:1C53 mov ds,[1ae]                                                       
  106. 2674:1C57 mov dl,80      
  107. 2674:1C59 -w             
  108. Writing 2BD0 bytes       
  109. -q                       
  110.                          
  111. C:\WORK1>ren a xcopy.exe 
  112.                          
  113. C:\WORK1>                
  114.                          
  115. Sorry about that.        
  116.